<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 数组的解构
        const F4= ['小飞侠','大猪比','阴阳人','张三'];
        let [xiao,da,yin,zhang] = F4;
        console.log(xiao);
        console.log(da);
        console.log(yin);
        console.log(zhang);

        // 对象的解构
        var obj = {
            name:'小五',
            age:16,
            dldl:function(){
                console.log("斗罗大陆");
            }
        }
        let {name,age,dldl} = obj;
        console.log(name);
        console.log(age);
        console.log(dldl);
        dldl();
    </script>
</body>
</html>